package com.shengde.jinwawaforleader.utils;

import android.content.Context;
import android.util.TypedValue;

public class ScreenUtils {
	private static ScreenUtils screenUtils;

	private ScreenUtils() {

	}

	public static ScreenUtils get() {
		if (screenUtils == null) {
			synchronized (ScreenUtils.class) {
				if (screenUtils == null) {
					screenUtils = new ScreenUtils();
				}
			}
		}
		return screenUtils;
	}

	public int getDimension(Context context, int value) {
		return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
				value, context.getResources().getDisplayMetrics());
	}

}